Check that closing is successful, add filenames to msgs.