Writing to external storage