Sync buffer to storage