Replace if with begin..rescue for FileUtils.cp