added checks for folders in build and publish