Fixed opening wrong file. Added expand_user(path)