fix exception handling, organize for installer