made copy to file work in visual mode