fix incorrect use of path instead of filepath