Add on-save behaviour