add open file and exit