Create output before opening the file descriptor to avoid blank widgets