error check in post script