Added code to detect faces
Fix thread sleep