checking file descriptors