set LOCALPATH correctly and find the catalogtype
print number of errors