test output redirect to file