Added --trace and --debug flags