Issue #11 Further log functionality

* 'writeLog()' fails if log is not initalized
* 'writeLog()' can write a string to the right log file

Also, implement system wrapper for file write operations