Updates package.json metadata
Improves error handling