print and debug of BAT