Generating unique filenames using uuid4 instead of linear search.