adding fileEncoding as an option. fixes #1