Added execution of the completion handler also for unknown errors.
Also refactored the repeated dispatch_async block.