main method tested and working for copying file