Added a utility function for copying files