Improve output and error signalling