Adding better error handling.
Updating the readme.