Added file exist checks in testingAPI.