Added SafeCreateReader for jpeg and png