extract file writing to their own methods
extract file writing to their own methods

Signed-off-by: Chris Boertien <711c73f64afdce07b7e38039a96d2224209e9a6c@aktionlab.com>

AktionLab/aktion_cap,AktionLab/aktion_cap