seralize writes to file descriptors
handle if fd has already closed, when register fds