Ensure we close the file descriptor