beego: close the file when finish init