simplify trap quoting
improve backup deletion logging
Fix logging function logic