Make error handling more readable