Adds config option to enable/disable raw API dump
Refactors error handling and resolves #5