Combined WritePiToFile with PiMeth