It is very simple and like this to test for the existence of file using bash scripting:
if [ -f /etc/somefile ]; then
echo "yes it exists"
fi