adding some logging statements

Could you update the documentation for this method?