1. add code shlib
2. add function to stop logging logoutput