add loging to credit method