More efficient version of writing EEG data to file.