Improve error and stream handling in fs.copy