replacing throw error with callback error
Merge pull request #2 from darul75/master

replacing throw error with callback error