Need to handle exception if the project is deleted or closed. And I should also make sure that ``project`` is not ``null``