Finalized logging, fixed infinite scp bug, now limited to five retries.