Added os.Exit(0) when the file finished