- fixed some TODO: close file somehow