Add flush method for app and change echo for render