updated to handle both test file types and a variable path