added restart capability and logging and cleanup script