made file more generic, so hopefully better maintainable.
log level can now be changed from the command line.