Add some checks and change printf to allegro native dialog