added class for file access
changes visibility of encoding to private