file open and close to make data abalable during calc