RCOutput:add close(_fd) to some functions