add file writing for obj logger. use by calling logger.write(str)