Writes changes to logfile