rm pkg bin and src. and moved src/* to .
fix compile error
add a defer closure function to close the file and delete it