Fixed bug with garbage characters introduced into file in error.