Changed error message to display on non-directories