improved build script, clean first then build