file existance detection added