adding script to chek for errors