Use promises for async operations and catch all errors