added logging to runp