Used uuidgen
Refacted timeout section to be a loop
Added output for progress
Fixed indentation