some more logging. fix query timeout