Better error handling and updated readme