Fixed reading files