change
                                                                                dispatch_async(dispatch_get_main_queue(), ^{

back to
                                                        [[NSOperationQueue mainQueue] addOperationWithBlock:^{
changed error handling to check if error message is set rather than having a separate boolean