Log error *then* return.
Added comment (Issue #19)
Correct handling of '301 Moved Permanently' (Issue #17)