Using fail() function