'Method that writes stuff to the text_file.
:param message: The message to write to the file
:param log_type: Type of message are we writing to the file
:param new_line: Add a new line after the message'

def write(self, message, log_type, new_line=True, flush=False):

    if (not self._initialized):
        self._init()
    to_print = str(message)
    if new_line:
        to_print += '\n'
    now = time.localtime(time.time())
    the_time = time.strftime('%c', now)
    if self._show_caller:
        timestamp = (LONG_LOG_FMT % (the_time, log_type, self.get_caller()))
    else:
        timestamp = (SHORT_LOG_FMT % (the_time, log_type))
    self._write_to_file((timestamp + to_print), flush=flush)
