Fixed the error handling with the help of the awesome people in *#rust*