redirect output works