Fix logging to file and add .idea to gitignore