struct bag writen and read from file.