Added file io call to update pwm period