add check for filename extension