Fixed issue using JDK 1.6: On sign the output file has to be different to the input file.