cleanup in prompt and added debug messages for cleanup task