Added throw err;.
Inversed end-state of relais.