improve error management in restartController function