set encoding before opening a file
fix @example for logging missed namespace.