Making templates plugin work within daemon mode or when console is not there.