open file test code