write to log file after each file is processed