Add handling for exceptions
Add exception handling in the README