some cleanup in r_core_file_free