fixed quoted ~ not expanding, changed into HOME var