Fix logging

problem was that log was pointing to each loop instead of real caller.