use only one file descriptor