no need to call fileno twice