That should not be an problem. Describe to us step by stem with details how did you do creation of custom 404 page, so we could see where did you make mistake.Also submit error.php.
One thing before that, when you intentionally want to see that page you can enter that link directly in browser address bar. That same link you put in file_get_contents(... as argument. If it's not working like that then maybe just bad url is problem. Note that you have SEF enabled.
I have attached the error file I created (error custom file.php) and the original error.php file that is currently installed (the error text here is in English and not in greek as the joomla 404 error page that shows up in my website)