Fixing error in logging when not in DEBUG mode, adding .gitignore