add support to local folder
add support to keep extension, should be an option