set beginlibpath=e:\sane\lib;
set SANE_DEBUG_SNAPSCAN=255
set SANE_DEBUG_SANEI_USB=255 
set SANE_DEBUG_DLL=255 
set sane_config_dir=\sane\etc\sane.d
cd bin
scanimage -v  1>..\output.pnm 2>..\debugoutput.txt
cd ..