Implemented log for executed queries