how to open a file descriptor