Clean up build stuff
Add exception intsead of crash