use block chdir instead of going up manually
should there be an error the block will automatically un-chdir. otherwise we may be left in the incorrect pwd