Removed warning on fopen because it is handled by exception