neic: close opened file and be pythonic