Use proper fail() function