More debugging of step function, model now runs for a while, but eventually crashes