unnecessary null check
Simplify format string parsing
Remove race condition