Event hook on statement stored