major improvements on installer; with dependency check and better error handling