does anyone have a function to check if a file is open.