add error logging for bad file reads

add error logging for bad file read

change encoding

try slightly different file reading technique

remove console.log