Fix bug in TempoparyFile.cs & add test