Issue #9
Added file extension check.