optimize get background logic
format all files