Changed file() to open(), fixed some wrong string literals.