Added file/folder check