fix bugs, including file size calculate uncorrect, display untidy and cannot escape event loop.