Changed gitignore function to be called after file copy