Added the file Open and close functionality