added checkEntry function to check for backgrounding and internal commands and no entry