Adding working directory check
Added working dir check and logging to Restart script