Added sleep methods to wait for processes to load