fixing return value of fwrite