Added setup and printError method.