Added cleaner, yet compatible file handling code
Added cleaner, yet compatible file handling code, updated README too