Separate append absolute path to a function