Not write pig meta data only when pig is not avaliable

Not write pig meta data only when pig is not avaliable