updating changelog
adding if is_resource check around fclose to prevent warnings