fixed issue where files which are a multiple of width had an additional empty line of output