replaced some throws and returns with returning an error message string, for more intelligent handling of problems
in output_files() when bulk creating new StepOutputFiles, do it in a transaction with locked file rows to try and avoid failed foreign key constraints
in the trigger() transaction, only die if the error was unknown - probably due to a db issue: this avoids wasted/infinite cycles when the error is known and already handled
correct test step code to use dispatch() correctly