Edit files with transaction support