fix add file checks