file extension handling improvements