Use real Error objects
Fix sync version
Fix framework path resolution