Fixed log message at end. Added sleeps and loop counts to rest of conditions.