fix path and encoding error