Initial commit
Fixed error handling