improved readme and added error checking
improved readme and added error checking