fixed logging, added insatlled check