changed tests to use err streams