Fixed check on block device check to be robust