fixes scratch_dir not found error