provide some lower level error handling
todo: catch the other execptions here as well.