Added a copy file function