Check config and gracefully fail
Moved config to class