use FILENO constants for clarity