fix problem with paths while copying file in safe mode