Add event beforeOperation/afterOperation