better exception handling for require