username,password modified. zero length key file handling added