Added logging to file.