Added error handling
Added isCreated