Hey @gh00st !
The garbage thing! Yeah ... I totally got that too (and right after that a crash). Quick test, search for FreeImage_DeInitialise and comment that line (should be on only one place if I remember correctly). If that fix your problem then you know what it is... You should call it at the end of the app, although to be honest I didn't see the difference with leaving it comment, the OS should clear all the memory and resources anyway, but I guess might be problematic not calling it in some scenarios... My curiosity wasn't strong enough to download FreeImage code and see what's going on.
Hope it helps.
PS: If this message formatting is weird it is because I am writing this from my phone.