catch stream exception