trying to fix full replacement of files