in reply to Existance of a file
You are looking for the file test operators -e "filename" or -f "filename". The former tests existance of anything with that name, the latter tests for a regular file.
After Compline,Zaxo