pipe: open file with flag os.O_TRUNC