+ # Determine working directory
+ if [[ -d "$DIR_TMP_DEFAULT" ]]; then
+ DIR_TMP_BASE="$DIR_TMP_DEFAULT"; # Use default working directory parent (ex: '/dev/shm')
+ #### elif [[ -d /tmp ]]; then
+ #### yell "WARNING:/dev/shm not available. Falling back to /tmp .";
+ #### DIR_TMP_BASE="/tmp";
+ else
+ yell "ERROR:No valid working directory available. Exiting.";
+ exit 1;
+ fi
+ DIR_TMP="$DIR_TMP_BASE"/"$SCRIPT_TIME_START""..bkgpslog"; # Define working directory for temproary files
+