- moved external files to lib folder - fixed typos - added optional "sudo" to flash command - fixed redundant file close in script - fixed compilation warning