Add fail handler to directory call