detect config file right