close report file after writing