make sure stdio exist and graceful exit when `reload/restart`