Added mail logfile check, modified database dump to be single transaction and added failsafe to recursive delete functions