Corrections and taking file in java code