fix for checking file exist