support multiple log files with rotation
remove bashism

"set -o pipefail" is not supported in dash! :(