fix to copying files into directory