That seems like programming 101 for these systems.
In the past, I've worked around this by validating the configuration of a file before attempting to run it. You bail out in a safe way during validation, but still allow a hard error during run time.
Doesn't prevent all misconfigured files, but prevents the stuff like.