pam: retrieve value of debug param first

We are setting debug to false by default, so we should should first retrieve
value of debug parameter and then log only if debug was set. Now we don't take
the value passed to us into the count.