Used bash 'test' instead of 'ls'