Completed timeToWait func.
Corrected http response closing. Running main fetches credentials from remote repo.