Fix error with strange characters in dir names breaking glob pattern
Log encoder output separately