Handle 404 error
Put functions where it belongs