corrected callback error handling
add sinon and stubbed exec function for unit test