The try catch around the entire thing is confusing me a bit. If the publish fails, is there a retry? I am worried about the case the publish fails and the file gets deleted. Would publising throw any other exception other than the following? For safety, let's have a generic catch (Exception ex) which logs an error and doesn't remove the file.