fixed potential minor mem leak, added error printing function
	modified:   spreload.c