Changed scanner and filename to static variables