I modified the main source including the possibility to read from a file and write in a file