Added sleep/wait options for retries.
Added more verbose logging.
Moved timestamp to print_log().