Properly load files and set encoding.