Add append_file method