adjust script for stderr output