Rewrited the way to capture the app name