Why are we throwing here (why do we want to stop the application)? We should make this function asynchronous and pass the error to the callback