Add option to log to file
Classify configuration

Avoids deserialization hacks around config state that complained about IO objects
WIP