added error.php and 404 error handling