Added copyFile() method.