Updated dependancies, better error handling/cleanup