Adding INFO loging
Fixing function bug