Added some tracing functions.