Added branch check and other build systems check
Added more error checking