Substituent effect on the reaction mechanism of proton transfer in formamide