I have to trust you that this approach is correct (the try and the write_to)....