converting query to lowercase, log improvement