Undoing commit 114 (except additional headers).
Added some extra logging.
Task class is now using Clients' logger.
Storing connection in cache now is available only if task was not canceled before.