minor correction to readme
mild refactoring of handle_error