Changed pwm initializer script.
Had to add "open-write-close" mechanism to every file operation to have _effect_. Flushing the fstreams did not solve the problem.