That's handled by the getUnusedFilename() utility function