print to file doesnt work