Added open/close operation and execution time measurement