added logic for creating logfile and missing directory
removed log reference from .gitignore