added config validation