Update valedaemon:audit-trail.js

Added more rigorous checking for existence of UI