code changes for Pig loader