Cosmethic code changes.

Signed-off-by: Daniel (dmilith) Dettlaff <dmilith@verknowsys.com>
Updated writeToFile() open mode. Always truncate existing file. Threat as text. Ignore buffers.

Signed-off-by: Daniel (dmilith) Dettlaff <dmilith@verknowsys.com>