made log level/file be configurable
move all configuration into core, required some breaking out of code and refactoring
make ActionReturn function