Added working fs function