Adds append and close functionality to ICode