Add automatic extension to the file name.