moved printError() into error.c and error.h files.