Logging added

Errors are not logged to a file to help in diagnosing problems
Added a rename option for configs
Fixed several bugs