Small correction and allows for output to stdout if desired by caller