Fixed bug: Should not close fp passed into read_file_fp