Replaced exec('cat') to native JS