Removed duplicated SQL error logging