something alike using file, thanks to TimToady, quietfanatic