Downgraded to java 1.6

Also changed file locking a tiny bit