add table formatting to logging -- needs to handle errors