Added error handling, call reject on error
0.3.0