Moved fs call.
Fix uknown encoding error.
Fix uknown encoding error.
Test buffer.
Fix readFileSync call.