File type deteciton fixed
Indenting in background thread added