Catch any exception thrown during profile creation and make sure it gets logged.