Print error messages on fopen fails.