Catch stream errors