Making sure file is always closed after querying