rewrote test
fs.close if fd is truthy