now checking for file rather than directory with mysql