Error handling
More accurate pgrepping