JS: add new line reader
JS: fix retry loop logic in record reader
JS: retry reset logic