test file open and extentsion and call function in main