update log print lines and write proper wrapper script