Fix check of presence of APP_HOME