Added -silent flag to auto close window