Cleanup error handling for consistency