added deleting of log entries
wrong promies (had two done()s)
refactored a bit