add recording callback to record plugin

I think it can be useful :)