explicit output flushing readded + need fix