Put into file double result.
Fixed open input and output files from BINARY_DIR.