added mess detection to the build script