pinTest error handling improved