better handle relative paths