added general error handling that skips all lines at that indent and greater