Revert "Improved copying of files"

This reverts commit 9bfffe75f0beb1405c64928f78171ad1164dc05f.