Save media files correctly