everything that calls getusername() should be checked, might not work properly for root using -u option