fix #116. Clean up logging and use a logging library
fix #40. Replace json with toml for configuration
make the location of the log file configurable