add additional check for the path method to make sure a home path is used properly in this method