clarified sample config
some more error handling