Added error messages if something went wrong