dl: avoid segfault if fopen fails