try catch a getrealpath