Fixed error logging
Fixed error logging