Added saving intermediate files to a subdirectory