check pwd in after script