added better error do document parsing