add more error checking in dsl, fix regression on load