Cleanup wip
Fix #40 - adding error handle