File adding fixed

Should work now. Extra check for request code was not necessary as the switch already took care of that.

Closes #147