added fixes for checking of invalid and new paths