Added log function to eventually streamline print stmts in a refactor