improve configuration and validate to fail early. fix #17, fix #31
Merge pull request #43 from ddeboer/validate-early

improve configuration and validate to fail early