added FileAccess, some code changes