Updated logging to file