add filename extension if possible