. add exception with explanation when realPath is null