implement try/catch (README and other stuff needs to be updated)