improve autolibs error, fix detecting errors, closes #1724, update #1720