add some scrappy error handling