add check if file exists for code-inc and preview swig exts