Added logging to files.