Added checking of the `piepan` global in each script