fixed error when loading template code via file expansion
added an error check which allow the user to drop to an interactive shell