Better error handling for all critical methods