minor update to write status of a file in the script