initial
added check for safe path