for save
fix stdin & stdout