check_dbs.sh: Extended error messages at corrupted tables and internal improvements.