generate random id when cannot read local file