Morelogging

Add more logging for debug and trace.