Improve attachment export