qDebug() replaced with qCritical() when needed