Fixed check for file in rdf creation.