updated core viewer to read local files too
actually call the function