Retrieving application name in the proper way