store output of all errors in a file code example
Example: bash script output and error to file
command1 > everything.txt 2>&1
command1 -arg > everything.txt 2>&1
command1 > everything.txt 2>&1
command1 -arg > everything.txt 2>&1