fixed HTTP retry loop

Also moved between-query sleep to start of parse loop