Fix streams not being closed
Example PNG library
minor cleanup of SDL module