more graceful error handling