[FIX] replaced old SAM writer completely