Using process.env['HOME'] instead of ~