public void Write(string file) { Log.Info("+ Sending file {0}", file); string maxId = null; if (FileUploader.IsStreamingTable(file)) { try { maxId = File.ReadAllText(FileUploader.MaxIdFileName(file)); } catch (UnauthorizedAccessException) { throw new TemporaryException("Unauthorized access or file is being used by another process."); } } DoSendFile(file, maxId); }