write basically working, but will have an extra new line if the last line width is 60
fixed the extra new line if last line in sample is 60