add support for append mode