merge append && prepend into one file