Do the log when the file is saved