Added failureBlock to allow proper handing of errors situations
Merge pull request #17 from Brendtos/master

failureBlock