fixed 5 warnings using SDK7. fixed bug that input stream error never be handled