add more information when failing to open file