fixed check to make sure we don't duplicate file in our system