All 2>/dev/null could be replaced with 2>>$logfile.
The logfile could be /tmp/42free~error_log.
At the beginning of the script, before doing anything else, it could put the date and time into the logfile to differentiate between different runs, and then the full command line 42free was invoked with.