Check pthread_create return
Clean up indentation