Added config loading and checking.