Added logging and added logfile to .gitignore.