readline function redefined in script mode