Optimized file writing

Optimized file accessing to write only on demand, not at an interval.
Optimization decreases hard drive usage and text flickering on OBS
and/or XSplit.