Strip new line characters from output- thanks kiiroitori for spotting this.