/// <summary>
        /// Generate update.json
        /// </summary>
        /// <param name="destinationPath">Destination path</param>
        /// <param name="pathToExe">Path to executable</param>
        /// <param name="pathToArchive">Path to archive</param>
        /// <param name="uri">URI</param>
        public static void GenerateUpdateJSON(string destinationPath, string pathToExe, string pathToArchive, string uri, ref string error)
        {
            UpdateDataContract update_data = new UpdateDataContract();

            update_data.uri = uri;
            if (File.Exists(pathToExe))
            {
                GetFileVersionInfo(pathToExe, out update_data.versionNumber, out update_data.version);
            }
            if (File.Exists(pathToArchive))
            {
                update_data.sha512 = SHA512FromFile(pathToArchive, ref error);
            }
            using (StreamWriter writer = new StreamWriter(destinationPath))
            {
                serializer.WriteObject(writer.BaseStream, update_data);
            }
        }
        /// <summary>
        /// Initialize object
        /// </summary>
        /// <param name="endpoint">Endpoint</param>
        /// <param name="pathToExe">Path to executable</param>
        /// <param name="timeout">Timeout</param>
        private void Init(string endpoint, string pathToExe, int timeout)
        {
            string version;

            GetFileVersionInfo(pathToExe, out originalVersionNumber, out version);
            using (WebClientEx wc = new WebClientEx(timeout))
            {
                wc.Headers.Set(HttpRequestHeader.Accept, "application/json");
                wc.Headers.Set(HttpRequestHeader.UserAgent, "Mozilla/3.0 (compatible; Updater .NET)");
                try
                {
                    using (MemoryStream stream = new MemoryStream(wc.DownloadData(endpoint)))
                    {
                        updateData = serializer.ReadObject(stream) as UpdateDataContract;
                    }
                }
                catch
                {
                    //
                }
            }
        }