prevent mutliple call open function