Improved error handling of the "module copy" feature.