making file type idempotent