WIP fix uninitialized variable usage
WIP fix race shutting down file descriptor