ADT write to file