updated to end experiments gracefully and improve error handling, using new functions in Basic/Stimulus