I have scheduled getfile processor to 0 sec to track the local folder.

Issue I have faced: PutFile is appending few flowfiles into single file. Getfile has been configured with keepsourcefile as false. So getfile is fetching partial content before putfile writes into local location.

How to handle this issue? Can we lock the file till putfile/custom processor completely writes the file and remove lock once completed??