added encoding headers + small fix in case project folder doesn't exist