changed error handling and configuration explanation