Removed bucket creation, Fixed error handling