use file objects not dicts