Modified building script file to check xml before compiling!