/// <summary>
        /// Tries to send a list of files (or a single file) to the webservice.
        /// </summary>
        /// <param name="file">The name / path of the file </param>
        /// <param name="metadata">The contents of the metadata</param>
        /// <returns></returns>
        private void DoSendFile(string file, string maxId)
        {
            // skip working if the file does not exist
            if (!File.Exists(file))
            {
                return;
            }

            LoggingHelpers.TimedLog(Log, String.Format("Uploading file : {0}", file), () =>
            {
                // try to send the request, convert the result from JSON
                var uploadTask = APIClient.UploadFile(file, maxId);
                // Wait for the result, so that our timed log can actually measure something
                uploadTask.Wait();

                Log.Debug("-> Sent ok: '{0}'", file);
                return;
            });
        }