Refactor bakery.py to make ability logging tasks #357