Added file checks