Added initialize_month() function to be called from celery; fixed runtime error with debug flag.