Thanks guys, it solved the problem. I'm shamed, very idiot problem. The only problem now is that when the code timeout it print a crazy error "Alarm clock" that I never asked to print. I mean, I have a own message like print ("Timeout\n"); but when the timeout happens it's never called and instead it prints this "Alarm clock" that is not in my code. There is a way to replace it with my own print timeout error? Thank you