Adding callback to command execution

Hi !

This pull request add a support to callback to retrieve the result of the exec command