file opening once per runtime, this resolves #5