Added logger, fixed problem with diagnostic buttons