             db.get binary, (err, doc) =>
                 if not err and doc
                     db.remove doc._id, doc._rev, (err, doc) =>
-                        log.error 'ERROR 1' if err?
                         log.error err if err
                         cb()
                 else
-                    log.error 'ERROR 2' if err?
                     log.error err if err
                     cb()
         , callback

                            # Remove access information
                            # from application/device document
                            db.save app, (err, doc) ->
                                log.error 'ERROR 3' if err?
                                log.error err if err?
                                cb()
                    else

            return cb(err) if err? or apps.length is 0
            async.forEachSeries apps, (app, cb) ->
                # Check if access exists
                db.view 'access/byApp', key:app.id, (err, accesses) ->
                    return cb(err) if err? or accesses.length is 0
                    if accesses?.length is 0
                        # Create it if necessary
