Missing error handling. It looks like the original code just dies when open() fails. That's probably fine here too.