Adds lifecycle manager and cleans up the directory