add debug information
fix reading files