Fixed the error handling in the driver
Merge pull request #57 from stof/invalid_usage_safeguards

Fixed the error handling in the driver