Fixed a timeout and file access conflict bug.