Bug fixing: models in batch_predict, test_set_headers, and file close