Close files after you open them

  + Add closing of files as not to leak file descriptors
go bs