adding fileEncoding as an option. 

This is a fix for the issue on file encoding be opinionated.

fixes #1