Add pp autodiscovery, fix wrong initial state, fix csv write
Fix wrong initial state