add reopen_log(), call it after using PAM stuff