Adding readline() dependency& workaround

Adding readline() dependency& workaround