added debug erors flag