updated readme
added parameter for throwing an exception on failure