Added autorestart

added autorestart.