Updated testing for commands or file