process.env.PATH as PATH fallback
fix resetState when no error