Script falls without correct pwd