added file checking for open feature