Removed unconditional trace statement, added some more conditional ones