IntermediateFile - more tests and some improvements