Created first draft of logWrite, with test and structure