run on_before_save right before storing the page