Updated conditional to better handle relative paths