plot command is creating pdf's that are corrupted.