improve method for finding boot file; add -Wall; fix bugs