add check for internal error in dat
new version for PyPi