Added auto-detect appname