Add prn func, fix script dir path for chroots