Add debug option and output to trace #1