Changed trace function to use util.inspect to properly output objects.