writes PM0.c to correct file