record module
added some tracing