added modified on check to prevent sweeping files that were still being written too