Fix EXIT code generated by errexit. Add function to remove LOG files older than 3 days