Add before and after callbacks to save