I would contribute the code, but I think that perhaps a cleaner solution would be to add to FileWritingMessageHandler the following methods ...
Of course it makes no sense to set both overwrite true and a collision filename generator.
* If true and the file already exists overwrite the original file.
* @param overwrite true or false
public void setOverwriteFiles(final boolean overwrite);
* If set and the file already exists use the filename generator to rename the previous version of the file.
* @param filenameGenerator used to create an alternative filename for the previous version of the file
public void setCollisionFileNameGenerator(final FileNameGenerator filenameGenerator);