Made file loader a little more robust.