Okay, so I have just started fly fishing this year and have had 4 trout take my fly. Two of them I actually hooked in time, but while I was reeling in they got off. Here is my dilemma

While casting upstream the fly comes back to you in the current. While that is happening I am continually pulling in fly line which is piling up directly beneath me. When a trout strikes I pull up on the fly rod and hook the trout.

The problem is when I have to reel in the fly line beneath me. While I have the trout hooked I am reeling in the slack fly line beneath me and that is when the trout comes off.. what the heck am I doing wrong???