Added query logging in separate daily file.