Generate short file name only if needed