Handler for file export