added command to close text file