added debug info
fixed parameter overflow in bat