Allowed toPath() to resolve relative paths that used ../, and removed the console.log() call from the previewing code.