Fixed logname bug