close queue file before submitting