Fix path problem and encoding problem