Check for file before getopts
Check rule syntax