changed realpath to abspath