Removed the success check to return error code