Core (test/scale_test): Print and return an error instead of crashing if image file is not properly loaded