add -debug option for saving XML responses