added filename extension check, and blanked message variable after being displayed