This is probably an issue with your code. You aren't checking loadFromFile's return value, so it may be as simple as you put the smaller image in the wrong folder and it couldn't find it.
Assuming that isn't it, could you provide a *complete* and minimal example (i.e., one we can actually compile and run ourselves without filling in a bunch of stuff, and without that odd Filename logic you have), the .png that is working for you and the .png that is not working for you?