node: Call stop switch cmd

Also fix coding style to match with the rest of the project.