added loggingFSM for debugging