checking for errors while extracting