generates unique alphanumeric keys and writes them to a csv file