Transaction failed but the fee was still be deducted.

The cost is referred to as a 'fee' with respect to Ethereum. It equals "gas * gas_price." The fees are used to pay the miner to package your transaction. Every transaction has a fee irrespective of the status of the transaction. The two are not connected.

The fee is deducted by miners, imToken will not charge for transaction fee at this moment.

For further reading please refer to this link: https://media.consensys.net/ethereum-gas-fuel-and-fees-3333e17fe1dc.