Added sleep statement before terminating instance