add support for ${HOME} and ${CWD} in the filename