Add error chenking for conf files