saves extension for files