redundant db query removed & log msg change