Detect and catch yaml errors in config