first version: dump queue to file