fixing bug where checking wheter to include a file fails