Preliminary error handling
Added license