Added $mode parameter to fopen call on docs.