Added logging to file (hopefully).