check for preSubmit errors

Solves #200.
TODO: error bubbling.