Catch stream errors and display message instead of killing the process (fixes #23, #30)