Added file encoding to worker scope

for performance