With statement ensures correct close of bib file