fixed print function with path