fix bug.time judge condition is wrong.also this fix improves performance for this bug cause we check file everytime.