Issue #11 More log functionality

* 'terminateLog()' closes the log file
* 'terminateLog()' fails if failing to close the log file
* 'writeLog()' fails if the log has been terminated

Also, added system wrapper for close file operation
Issue #11 More log functionality

* 'initializeLog()' fails if called when already initialized
* Tests refactored for clarity