Update gitignore and add the function copy file to the main.c