Added -a/--attempts option to specify to run through multiple attempts in a row.