"ERROR: Bad file name in flux stack on line #"
wavdetect creates several temporary files. If it is terminated (Control+C) or otherwise quits unexpected, it not delete those temporary files. The next time you run wavdetect it may then report an error similar to above about "Bad file name in ... stack ....".
This may also happen if multiple instances of wavdetect are run on the same computer at the same time without changing the interdir and/or outputinfix parameter to unique names for each instance.
Workaround:
To fix the issue users must manually delete the errant stack files. These will be located, by default, in the $ASCDS_WORK_PATH directory.
/bin/rm ${ASCDS_WORK_PATH}/wr*stk ${ASCDS_WORK_PATH}/wt*stk ${ASCDS_WORK_PATH}/wd*stk
By default $ASCDS_WORK_PATH is "/tmp" on Linux systems, and will be in "/var" on macOS systems.