adds file open/close