Debugged. Script newline processing was wrong.