Code seems to have a memory leak from displaying files.