move the folder checking to build from script