Macro for fopen() with checks and useful error messages