add test code to check if file exists