added convenience method `addFile`