Add some recording code