added logging to file
reordered main
Merge pull request #87 from onefinestay/logging_to_file

added logging to file