Remove stdout use in tests