fix error logic when app path does not exist