async error handling, fixes require for internal modules