Write to data directory, avoid adding multiple handlers