added config checking