Write acc data to file