Serialize items to file