Added TMP_PATH setting
Changed APP variable by domain (more appropriate)