Debug: Remove superfluous newlines, add uiaction to print debug messages from UI