raise error if unknown argument passed to open_file
Regression - print sane error message if permission denied

that was working in the past, but broken after encodings reworks