Name all state functions for better stack traces
Stronger parameter checks in runFsmThreads