Added logging to file