Improved error handling in many places to detect missing files or NULL file handles.
Spelling.
More spelling
Spelling.
Even more spelling
close() file before dying.
Merge pull request #2191 from tklein23/fix_cmdline_segfault_on_missing_model_file

Fixed segfaults of cmdline_static if loading a model file failed