Updated with printa function, that prints to custom file