I use a custom JS file to convert DWG/DXF files to PNG via the command line

I use a custom JS file to convert DWG/DXF files to PNG via the command line:
qcadcmd.com -platform offscreen -no-gui -autostart scripts/dwg2png.js -input input.dwg -output output.png 2>error.log
The JS file can be loaded and executed, but the conversion to PNG did not succeed.

Additionally, how to suppress debug messages in the console output and keep only errors?

Environment
Windows10
Qcad 3.23.3 pro
53bfe443b0e82.dwg (333 KB)
dwg2png.js (7.11 KB)

May I ask if this is AI generated code? Since much of the API is dreamed up and non-existent.

Also, are you aware of dwg2bmp which comes with every installation of QCAD Professional and converts DXF and DWG files to many bitmap formats including PNG?

Under Linux, macOS or cygwin (Windows), you can use grep to filter messages. In the standard Windows command line, there’s probably no easy way.